package com.hoangkien.config;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;

public class CKSharePreferences implements ColoringKidsConfig {

	private SharedPreferences preferences;

	public CKSharePreferences(Context context) {
		preferences = context.getSharedPreferences(ColoringKidsConfig.NAME_SHAREPREFERENCE, Context.MODE_PRIVATE);
	}
	
	public int getIndexNameImage(){
		return preferences.getInt(ColoringKidsConfig.INTDEX_NAME_IMAGE, 0);
	}
	
	public void setIndexNameImage(int index){
		Editor editor = preferences.edit();
		editor.putInt(ColoringKidsConfig.INTDEX_NAME_IMAGE, index);
		editor.commit();
	}
}
